package com.example.administrator.yuejian2.adapter;

import android.content.Context;
import android.graphics.Paint;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.alibaba.android.vlayout.DelegateAdapter;
import com.alibaba.android.vlayout.LayoutHelper;
import com.alibaba.android.vlayout.VirtualLayoutManager;
import com.example.administrator.yuejian2.R;
import com.example.administrator.yuejian2.bean.ActivityBean;

import java.util.List;

public class ItemAdapter extends DelegateAdapter.Adapter{

    private Context context;
    private LayoutInflater layoutInflater;
    private LayoutHelper helper;
    private VirtualLayoutManager.LayoutParams layoutParams;
    public ItemAdapter(Context context, LayoutHelper helper)
    {
        this.layoutInflater = LayoutInflater.from(context);
        this.helper = helper;
        this.context=context;
    }

    public ItemAdapter(Context context, LayoutHelper helper, VirtualLayoutManager.LayoutParams layoutParams)
    {
        this.layoutInflater = LayoutInflater.from(context);
        this.helper = helper;
        this.context=context;
        this.layoutParams=layoutParams;
    }

    @Override
    public LayoutHelper onCreateLayoutHelper() {
        return helper;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View v=LayoutInflater.from(parent.getContext()).inflate(R.layout.logo_item,parent,false);
        return new ItemViewHolder(v);
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
        ItemViewHolder viewHolder=(ItemViewHolder)holder;

    }

    @Override
    public int getItemCount() {
        return 1;
    }

    class ItemViewHolder extends RecyclerView.ViewHolder
    {
        private TextView textView;
        public ItemViewHolder(View itemView) {
            super(itemView);
            textView=itemView.findViewById(R.id.content);
        }
    }
}
